package com.coolw.test.delaymessage;

import java.util.Calendar;

/**
 * Calendar 工具类
 *
 * @author coolw
 * @date 2025/2/28 11:55
 */
public class CalendarUtil {

    public static Calendar getInstance() {
        return Calendar.getInstance();
    }

    public static long getTimeMillis(int second) {
        Calendar calendar = getInstance();
        if (second > 0) {
            calendar.add(Calendar.SECOND, second);
        }
        return calendar.getTimeInMillis();
    }
}
